Loading In Data

data <- read.csv("MH_survey_only_higher_index.csv",
    na.strings = "NA")
names(data)
##  [1] "gender"              "age_group"           "country_lockdown"   
##  [4] "marital"             "smoking"             "fivfruitveg"        
##  [7] "hour_sleep"          "shielded"            "week_soc_distancing"
## [10] "lockdown_bubble"     "athlete"             "AIMS_TOTAL"         
## [13] "MHC_SF_OVERALL"      "HADS_OVERALL"        "RES_TOTAL"          
## [16] "LONE_TOTAL"
data <- data[, -c(17:22)]


# Assigning factors 
data$gender <- factor(data$gender)
data$age_group <- factor(data$age_group)
data$country_lockdown <- factor(data$country_lockdown)
data$marital <- factor(data$marital)
data$smoking <- factor(data$smoking)
data$fivfruitveg <- factor(data$fivfruitveg)
data$shielded <- factor(data$shielded)
data$week_soc_distancing <- factor(data$week_soc_distancing)
data$athlete <- factor(data$athlete)

Pairs Plot

plot(MHC_SF_OVERALL ~ gender, data = data)

plot(MHC_SF_OVERALL ~ age_group, data = data)

plot(MHC_SF_OVERALL ~ country_lockdown, data = data)

plot(MHC_SF_OVERALL ~ marital, data = data)

plot(MHC_SF_OVERALL ~ smoking, data = data)

plot(MHC_SF_OVERALL ~ fivfruitveg, data = data)

plot(MHC_SF_OVERALL ~ hour_sleep, data = data)

plot(MHC_SF_OVERALL ~ week_soc_distancing, data = data)

plot(MHC_SF_OVERALL ~ shielded, data = data)

plot(MHC_SF_OVERALL ~ lockdown_bubble, data = data)

plot(MHC_SF_OVERALL ~ athlete, data = data)

plot(MHC_SF_OVERALL ~ jitter(AIMS_TOTAL), data = data)
abline(line(data$AIMS_TOTAL, data$MHC_SF_OVERALL))

plot(MHC_SF_OVERALL ~ HADS_OVERALL, data = data)

plot(MHC_SF_OVERALL ~ RES_TOTAL, data = data)

plot(MHC_SF_OVERALL ~ LONE_TOTAL, data = data)

plot(MHC_SF_OVERALL ~ lockdown_bubble, data = data)

data %>% select(gender, athlete) %>% table()
##       athlete
## gender   1   2
##      1 201 152
##      2 162 238
data %>% select(age_group, athlete) %>% table()
##          athlete
## age_group   1   2
##         1  59  14
##         2 127  76
##         3  86  96
##         4  61  98
##         5  21  52
##         6   7  41
##         7   2  13
data %>% select(shielded, athlete) %>% table()
##         athlete
## shielded   1   2
##        1  28  38
##        2 335 352
data %>% select(marital, athlete) %>% table()
##        athlete
## marital   1   2
##       1 177 100
##       2 164 263
##       3   4   5
##       4  16  14
##       5   2   8
data %>% select(fivfruitveg, athlete) %>% table()
##            athlete
## fivfruitveg   1   2
##           1 201 209
##           2 162 181
data %>% select(smoking, athlete) %>% table()
##        athlete
## smoking   1   2
##       1 268 258
##       2  30  39
##       3  28  56
##       4  31  15
##       5   4  17
##       6   2   3
##       7   0   2
data %>% ggplot(aes(x=gender, y=MHC_SF_OVERALL, color=athlete)) + geom_boxplot()
## Warning: Removed 65 rows containing non-finite values (stat_boxplot).

Step-wise Regression

model_full <- lm(MHC_SF_OVERALL ~ ., data = data)
summary(model_full)
## 
## Call:
## lm(formula = MHC_SF_OVERALL ~ ., data = data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -25.026  -5.583   0.000   5.827  30.969 
## 
## Coefficients:
##                       Estimate Std. Error t value           Pr(>|t|)    
## (Intercept)          50.246527   6.907029   7.275 0.0000000000017282 ***
## gender2               2.711660   0.972984   2.787            0.00556 ** 
## age_group2            1.318527   1.555409   0.848            0.39709    
## age_group3            1.873309   1.878811   0.997            0.31931    
## age_group4            3.877951   2.031917   1.909            0.05701 .  
## age_group5            2.273929   2.364697   0.962            0.33680    
## age_group6            9.094306   3.214220   2.829            0.00489 ** 
## age_group7            1.722124   5.298284   0.325            0.74532    
## country_lockdown2     1.487663   1.000024   1.488            0.13760    
## country_lockdown3     1.199211   9.400229   0.128            0.89855    
## country_lockdown4     1.009035   6.667576   0.151            0.87978    
## country_lockdown5     1.751674   9.313891   0.188            0.85091    
## country_lockdown7    -2.933821  11.393542  -0.257            0.79692    
## marital2              0.154912   1.301414   0.119            0.90531    
## marital3             -3.141366   5.470277  -0.574            0.56610    
## marital4              1.669728   2.488518   0.671            0.50261    
## marital5              6.093416   6.541366   0.932            0.35212    
## smoking2              1.043609   1.505094   0.693            0.48845    
## smoking3             -0.776139   1.585909  -0.489            0.62482    
## smoking4              2.121207   1.792722   1.183            0.23739    
## smoking5              2.863919   3.375812   0.848            0.39672    
## smoking6             -2.292072   4.220523  -0.543            0.58737    
## smoking7              5.377471   7.022743   0.766            0.44427    
## fivfruitveg2         -1.081264   0.905453  -1.194            0.23309    
## hour_sleep           -0.039662   0.457278  -0.087            0.93092    
## shielded2            -1.011218   1.579634  -0.640            0.52242    
## week_soc_distancing1 -6.783485   7.465507  -0.909            0.36406    
## week_soc_distancing2  4.152675   4.204185   0.988            0.32385    
## week_soc_distancing3 -0.520379   3.848897  -0.135            0.89252    
## week_soc_distancing4  0.721741   3.587953   0.201            0.84067    
## week_soc_distancing5 -1.234746   3.546390  -0.348            0.72789    
## week_soc_distancing6 -0.336337   3.673477  -0.092            0.92709    
## week_soc_distancing7  3.166418   3.717677   0.852            0.39486    
## lockdown_bubble       0.014524   0.329413   0.044            0.96485    
## athlete2             -2.557496   1.210811  -2.112            0.03526 *  
## AIMS_TOTAL           -0.005222   0.440542  -0.012            0.99055    
## HADS_OVERALL         -0.736696   0.091781  -8.027 0.0000000000000102 ***
## RES_TOTAL             0.353353   0.114085   3.097            0.00208 ** 
## LONE_TOTAL           -2.388482   0.320363  -7.456 0.0000000000005206 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 9.069 on 418 degrees of freedom
##   (296 observations deleted due to missingness)
## Multiple R-squared:  0.5949, Adjusted R-squared:  0.558 
## F-statistic: 16.15 on 38 and 418 DF,  p-value: < 2.2e-16
try(step(model_full, direction = "backward"))
## Start:  AIC=2052.46
## MHC_SF_OVERALL ~ gender + age_group + country_lockdown + marital + 
##     smoking + fivfruitveg + hour_sleep + shielded + week_soc_distancing + 
##     lockdown_bubble + athlete + AIMS_TOTAL + HADS_OVERALL + RES_TOTAL + 
##     LONE_TOTAL
## 
##                       Df Sum of Sq   RSS    AIC
## - smoking              6     296.1 34674 2044.4
## - country_lockdown     5     189.9 34568 2045.0
## - marital              4     143.6 34522 2046.4
## - AIMS_TOTAL           1       0.0 34378 2050.5
## - lockdown_bubble      1       0.2 34378 2050.5
## - hour_sleep           1       0.6 34379 2050.5
## - shielded             1      33.7 34412 2050.9
## - age_group            6     840.7 35219 2051.5
## - fivfruitveg          1     117.3 34495 2052.0
## <none>                             34378 2052.5
## - week_soc_distancing  7    1080.2 35458 2052.6
## - athlete              1     366.9 34745 2055.3
## - gender               1     638.8 35017 2058.9
## - RES_TOTAL            1     789.0 35167 2060.8
## - LONE_TOTAL           1    4571.5 38950 2107.5
## - HADS_OVERALL         1    5298.8 39677 2116.0
## 
## Step:  AIC=2044.38
## MHC_SF_OVERALL ~ gender + age_group + country_lockdown + marital + 
##     fivfruitveg + hour_sleep + shielded + week_soc_distancing + 
##     lockdown_bubble + athlete + AIMS_TOTAL + HADS_OVERALL + RES_TOTAL + 
##     LONE_TOTAL
## 
##                       Df Sum of Sq   RSS    AIC
## - country_lockdown     5     248.4 34922 2037.6
## - marital              4     147.8 34822 2038.3
## - hour_sleep           1       0.2 34674 2042.4
## - lockdown_bubble      1       0.2 34674 2042.4
## - AIMS_TOTAL           1       7.4 34681 2042.5
## - age_group            6     787.2 35461 2042.6
## - shielded             1      33.4 34707 2042.8
## - fivfruitveg          1      94.1 34768 2043.6
## <none>                             34674 2044.4
## - week_soc_distancing  7    1245.4 35919 2046.5
## - athlete              1     351.5 35026 2047.0
## - gender               1     588.6 35263 2050.1
## - RES_TOTAL            1     787.9 35462 2052.7
## - LONE_TOTAL           1    4700.8 39375 2100.5
## - HADS_OVERALL         1    5384.2 40058 2108.3
## 
## Step:  AIC=2037.64
## MHC_SF_OVERALL ~ gender + age_group + marital + fivfruitveg + 
##     hour_sleep + shielded + week_soc_distancing + lockdown_bubble + 
##     athlete + AIMS_TOTAL + HADS_OVERALL + RES_TOTAL + LONE_TOTAL
## 
##                       Df Sum of Sq   RSS    AIC
## - marital              4     135.8 35058 2031.4
## - age_group            6     709.9 35632 2034.8
## - hour_sleep           1       0.1 34922 2035.6
## - lockdown_bubble      1       0.3 34923 2035.7
## - AIMS_TOTAL           1       4.7 34927 2035.7
## - shielded             1      40.3 34963 2036.2
## - fivfruitveg          1     114.4 35037 2037.1
## <none>                             34922 2037.6
## - week_soc_distancing  7    1312.0 36234 2040.5
## - athlete              1     388.9 35311 2040.7
## - gender               1     721.9 35644 2045.0
## - RES_TOTAL            1     824.8 35747 2046.3
## - LONE_TOTAL           1    4657.7 39580 2092.9
## - HADS_OVERALL         1    5427.3 40350 2101.7
## 
## Step:  AIC=2031.42
## MHC_SF_OVERALL ~ gender + age_group + fivfruitveg + hour_sleep + 
##     shielded + week_soc_distancing + lockdown_bubble + athlete + 
##     AIMS_TOTAL + HADS_OVERALL + RES_TOTAL + LONE_TOTAL
## 
##                       Df Sum of Sq   RSS    AIC
## - lockdown_bubble      1       0.4 35059 2029.4
## - hour_sleep           1       0.6 35059 2029.4
## - AIMS_TOTAL           1       5.5 35064 2029.5
## - shielded             1      32.3 35090 2029.8
## - fivfruitveg          1     115.5 35174 2030.9
## <none>                             35058 2031.4
## - age_group            6     970.4 36029 2031.9
## - week_soc_distancing  7    1340.3 36398 2034.6
## - athlete              1     428.3 35487 2035.0
## - gender               1     719.0 35777 2038.7
## - RES_TOTAL            1     821.1 35879 2040.0
## - LONE_TOTAL           1    4813.9 39872 2088.2
## - HADS_OVERALL         1    5543.8 40602 2096.5
## 
## Step:  AIC=2029.42
## MHC_SF_OVERALL ~ gender + age_group + fivfruitveg + hour_sleep + 
##     shielded + week_soc_distancing + athlete + AIMS_TOTAL + HADS_OVERALL + 
##     RES_TOTAL + LONE_TOTAL
## 
##                       Df Sum of Sq   RSS    AIC
## - hour_sleep           1       0.7 35059 2027.4
## - AIMS_TOTAL           1       5.6 35064 2027.5
## - shielded             1      32.1 35091 2027.8
## - fivfruitveg          1     115.1 35174 2028.9
## <none>                             35059 2029.4
## - age_group            6    1000.9 36059 2030.3
## - week_soc_distancing  7    1340.8 36399 2032.6
## - athlete              1     430.8 35489 2033.0
## - gender               1     725.8 35784 2036.8
## - RES_TOTAL            1     820.8 35879 2038.0
## - LONE_TOTAL           1    4814.4 39873 2086.2
## - HADS_OVERALL         1    5550.2 40609 2094.6
## 
## Step:  AIC=2027.43
## MHC_SF_OVERALL ~ gender + age_group + fivfruitveg + shielded + 
##     week_soc_distancing + athlete + AIMS_TOTAL + HADS_OVERALL + 
##     RES_TOTAL + LONE_TOTAL
## 
##                       Df Sum of Sq   RSS    AIC
## - AIMS_TOTAL           1       5.7 35065 2025.5
## - shielded             1      31.8 35091 2025.8
## - fivfruitveg          1     114.6 35174 2026.9
## <none>                             35059 2027.4
## - age_group            6    1036.8 36096 2028.8
## - week_soc_distancing  7    1340.9 36400 2030.6
## - athlete              1     430.3 35490 2031.0
## - gender               1     730.9 35790 2034.9
## - RES_TOTAL            1     820.4 35880 2036.0
## - LONE_TOTAL           1    4816.0 39875 2084.2
## - HADS_OVERALL         1    5728.0 40787 2094.6
## Error in step(model_full, direction = "backward") : 
##   number of rows in use has changed: remove missing values?
model_step <- lm(MHC_SF_OVERALL ~ gender + age_group + country_lockdown + marital +
    smoking + fivfruitveg + shielded + week_soc_distancing +
    athlete + AIMS_TOTAL + HADS_OVERALL + RES_TOTAL + LONE_TOTAL, data = data)
summary(model_step)
## 
## Call:
## lm(formula = MHC_SF_OVERALL ~ gender + age_group + country_lockdown + 
##     marital + smoking + fivfruitveg + shielded + week_soc_distancing + 
##     athlete + AIMS_TOTAL + HADS_OVERALL + RES_TOTAL + LONE_TOTAL, 
##     data = data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -25.009  -5.583   0.000   5.817  30.939 
## 
## Coefficients:
##                       Estimate Std. Error t value Pr(>|t|)    
## (Intercept)          50.016356   5.688292   8.793  < 2e-16 ***
## gender2               2.698905   0.961510   2.807  0.00523 ** 
## age_group2            1.312310   1.510305   0.869  0.38540    
## age_group3            1.872792   1.810821   1.034  0.30163    
## age_group4            3.896371   1.988191   1.960  0.05069 .  
## age_group5            2.285144   2.299248   0.994  0.32086    
## age_group6            9.092557   3.121759   2.913  0.00378 ** 
## age_group7            1.713001   5.252321   0.326  0.74448    
## country_lockdown2     1.490543   0.995118   1.498  0.13492    
## country_lockdown3     1.143339   9.358446   0.122  0.90282    
## country_lockdown4     1.022004   6.633506   0.154  0.87763    
## country_lockdown5     1.744008   9.280041   0.188  0.85102    
## country_lockdown7    -2.958809  11.362887  -0.260  0.79469    
## marital2              0.148478   1.296610   0.115  0.90889    
## marital3             -3.161891   5.451022  -0.580  0.56219    
## marital4              1.650123   2.457043   0.672  0.50221    
## marital5              6.109372   6.521356   0.937  0.34939    
## smoking2              1.044705   1.500482   0.696  0.48666    
## smoking3             -0.756128   1.568443  -0.482  0.62999    
## smoking4              2.125730   1.786341   1.190  0.23472    
## smoking5              2.857888   3.361529   0.850  0.39571    
## smoking6             -2.265178   4.199286  -0.539  0.58988    
## smoking7              5.411170   6.973880   0.776  0.43823    
## fivfruitveg2         -1.079606   0.901978  -1.197  0.23201    
## shielded2            -1.007234   1.572714  -0.640  0.52223    
## week_soc_distancing1 -6.759509   7.440283  -0.909  0.36413    
## week_soc_distancing2  4.124415   4.183626   0.986  0.32478    
## week_soc_distancing3 -0.543552   3.824769  -0.142  0.88706    
## week_soc_distancing4  0.697073   3.565214   0.196  0.84508    
## week_soc_distancing5 -1.260876   3.523748  -0.358  0.72066    
## week_soc_distancing6 -0.363132   3.646840  -0.100  0.92073    
## week_soc_distancing7  3.149372   3.702261   0.851  0.39544    
## athlete2             -2.548032   1.203760  -2.117  0.03487 *  
## AIMS_TOTAL           -0.005515   0.439135  -0.013  0.98999    
## HADS_OVERALL         -0.735208   0.090060  -8.164 3.83e-15 ***
## RES_TOTAL             0.353195   0.113777   3.104  0.00204 ** 
## LONE_TOTAL           -2.387924   0.319337  -7.478 4.45e-13 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 9.047 on 420 degrees of freedom
##   (296 observations deleted due to missingness)
## Multiple R-squared:  0.5948, Adjusted R-squared:  0.5601 
## F-statistic: 17.13 on 36 and 420 DF,  p-value: < 2.2e-16
par(mfrow = c(2, 2))
plot(model_step)
## Warning: not plotting observations with leverage one:
##   332, 420

## Warning: not plotting observations with leverage one:
##   332, 420
## Warning in sqrt(crit * p * (1 - hh)/hh): NaNs produced

## Warning in sqrt(crit * p * (1 - hh)/hh): NaNs produced

model_step2 <- lm(MHC_SF_OVERALL ~ gender + age_group + marital +
    smoking + fivfruitveg + shielded + week_soc_distancing +
    athlete + AIMS_TOTAL + HADS_OVERALL + RES_TOTAL + LONE_TOTAL, data = data)
summary(model_step2)
## 
## Call:
## lm(formula = MHC_SF_OVERALL ~ gender + age_group + marital + 
##     smoking + fivfruitveg + shielded + week_soc_distancing + 
##     athlete + AIMS_TOTAL + HADS_OVERALL + RES_TOTAL + LONE_TOTAL, 
##     data = data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -23.734  -5.345   0.145   5.742  32.263 
## 
## Coefficients:
##                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)          50.19852    5.65581   8.876  < 2e-16 ***
## gender2               2.89320    0.94168   3.072  0.00226 ** 
## age_group2            1.18059    1.49875   0.788  0.43130    
## age_group3            1.70395    1.78365   0.955  0.33996    
## age_group4            3.69486    1.96662   1.879  0.06096 .  
## age_group5            2.56917    2.27643   1.129  0.25971    
## age_group6            8.77580    3.09462   2.836  0.00479 ** 
## age_group7            1.52274    5.22874   0.291  0.77102    
## marital2              0.16659    1.28107   0.130  0.89659    
## marital3             -3.07091    5.42792  -0.566  0.57185    
## marital4              1.56446    2.44171   0.641  0.52205    
## marital5              5.75045    6.49488   0.885  0.37645    
## smoking2              1.13926    1.47527   0.772  0.44040    
## smoking3             -0.89078    1.55262  -0.574  0.56646    
## smoking4              2.24465    1.77194   1.267  0.20593    
## smoking5              3.04754    3.34777   0.910  0.36317    
## smoking6             -2.36181    4.18504  -0.564  0.57282    
## smoking7              6.12418    6.93476   0.883  0.37767    
## fivfruitveg2         -1.17530    0.89490  -1.313  0.18978    
## shielded2            -1.07324    1.56228  -0.687  0.49248    
## week_soc_distancing1 -7.97089    6.35601  -1.254  0.21051    
## week_soc_distancing2  3.88815    4.14216   0.939  0.34843    
## week_soc_distancing3 -0.53104    3.81225  -0.139  0.88928    
## week_soc_distancing4  0.64570    3.54943   0.182  0.85573    
## week_soc_distancing5 -1.24050    3.51237  -0.353  0.72413    
## week_soc_distancing6 -0.20768    3.63069  -0.057  0.95441    
## week_soc_distancing7  3.13844    3.68992   0.851  0.39550    
## athlete2             -2.64021    1.18891  -2.221  0.02690 *  
## AIMS_TOTAL            0.03081    0.43484   0.071  0.94354    
## HADS_OVERALL         -0.73496    0.08934  -8.227 2.37e-15 ***
## RES_TOTAL             0.35972    0.11302   3.183  0.00157 ** 
## LONE_TOTAL           -2.37544    0.31793  -7.472 4.55e-13 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 9.019 on 425 degrees of freedom
##   (296 observations deleted due to missingness)
## Multiple R-squared:  0.5926, Adjusted R-squared:  0.5629 
## F-statistic: 19.94 on 31 and 425 DF,  p-value: < 2.2e-16
model_step3 <- lm(MHC_SF_OVERALL ~ gender + age_group + 
    fivfruitveg + shielded + hour_sleep +
    athlete + AIMS_TOTAL + RES_TOTAL + LONE_TOTAL + athlete, data = data) #HADS_OVERALL
summary(model_step3) #<<<<<<
## 
## Call:
## lm(formula = MHC_SF_OVERALL ~ gender + age_group + fivfruitveg + 
##     shielded + hour_sleep + athlete + AIMS_TOTAL + RES_TOTAL + 
##     LONE_TOTAL + athlete, data = data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -25.944  -6.619   0.637   6.939  36.208 
## 
## Coefficients:
##              Estimate Std. Error t value           Pr(>|t|)    
## (Intercept)   31.3619     5.4507   5.754 0.0000000163299545 ***
## gender2        1.6328     0.9691   1.685            0.09274 .  
## age_group2     1.0628     1.5857   0.670            0.50303    
## age_group3     0.9450     1.6538   0.571            0.56800    
## age_group4     3.4955     1.7497   1.998            0.04635 *  
## age_group5     3.3515     2.1177   1.583            0.11423    
## age_group6    11.4471     3.0305   3.777            0.00018 ***
## age_group7     5.0592     4.7406   1.067            0.28646    
## fivfruitveg2  -1.7103     0.9542  -1.792            0.07374 .  
## shielded2     -0.5426     1.6472  -0.329            0.74202    
## hour_sleep     0.6645     0.4714   1.410            0.15936    
## athlete2      -2.9128     1.2553  -2.320            0.02077 *  
## AIMS_TOTAL    -0.1495     0.4524  -0.330            0.74121    
## RES_TOTAL      0.8153     0.1059   7.701 0.0000000000000892 ***
## LONE_TOTAL    -3.6388     0.2907 -12.516            < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 9.773 on 442 degrees of freedom
##   (296 observations deleted due to missingness)
## Multiple R-squared:  0.5025, Adjusted R-squared:  0.4867 
## F-statistic: 31.89 on 14 and 442 DF,  p-value: < 2.2e-16
par(mfrow = c(2, 2))
plot(model_step3)

# Collinearity

library(corrplot)
## corrplot 0.84 loaded
library(RColorBrewer)

cor_tbl = data %>% select(-MHC_SF_OVERALL) %>%  
    mutate_each(as.numeric)  %>% na.omit() %>% cor()
## Warning: `mutate_each_()` is deprecated as of dplyr 0.7.0.
## Please use `across()` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_warnings()` to see where this warning was generated.
corrplot(cor_tbl, type="upper", order="hclust", method="color")

library(corrplot)
library(RColorBrewer)

cor_tbl = data %>% select(-MHC_SF_OVERALL) %>%  
    mutate_each(as.numeric)  %>% na.omit() %>% cor()

corrplot(cor_tbl, type="upper", order="hclust", method="color",
         col=brewer.pal(n=8, name="RdYlBu"))

Final Model?

model_step4 <- lm(MHC_SF_OVERALL ~ gender + age_group + fivfruitveg + shielded  +
    athlete + AIMS_TOTAL + RES_TOTAL + LONE_TOTAL + athlete, data = data)
summary(model_step4)
## 
## Call:
## lm(formula = MHC_SF_OVERALL ~ gender + age_group + fivfruitveg + 
##     shielded + athlete + AIMS_TOTAL + RES_TOTAL + LONE_TOTAL + 
##     athlete, data = data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -25.826  -6.630   0.657   6.916  36.057 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   36.1532     4.2658   8.475 3.51e-16 ***
## gender2        1.7718     0.9652   1.836 0.067075 .  
## age_group2     0.9342     1.5848   0.590 0.555823    
## age_group3     0.6923     1.6459   0.421 0.674229    
## age_group4     3.0606     1.7242   1.775 0.076562 .  
## age_group5     2.9433     2.1002   1.401 0.161772    
## age_group6    11.1693     3.0275   3.689 0.000253 ***
## age_group7     4.8023     4.7424   1.013 0.311789    
## fivfruitveg2  -1.7840     0.9538  -1.870 0.062083 .  
## shielded2     -0.6186     1.6481  -0.375 0.707601    
## athlete2      -2.9981     1.2552  -2.388 0.017337 *  
## AIMS_TOTAL    -0.1182     0.4523  -0.261 0.793988    
## RES_TOTAL      0.8303     0.1055   7.874 2.67e-14 ***
## LONE_TOTAL    -3.6993     0.2879 -12.850  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 9.784 on 443 degrees of freedom
##   (296 observations deleted due to missingness)
## Multiple R-squared:  0.5002, Adjusted R-squared:  0.4856 
## F-statistic: 34.11 on 13 and 443 DF,  p-value: < 2.2e-16